package com.huaxin.hxenum.validation;

import com.huaxin.hxenum.validator.EquipmentDataTypeValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = EquipmentDataTypeValidator.class)
public @interface ValidEquipmentDataType {
    String message() default "无效的设备数据类型，允许值：CURRENT, VOLTAGE, ACTIVE_POWER, REACTIVE_POWER, APPARENT_POWER, POWER_FACTOR, FREQUENCY, ENERGY, TEMPERATURE, HUMIDITY, DOOR_STATUS, LEAKAGE_CURRENT, SMOKE_ALARM, WATER_LEVEL, VIBRATION";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}